﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tasker.Composition;
using Tasker.Infrastructure.Repositories;
using Tasker.Repositories.Repositories;

namespace Tasker.Repositories.Resolvers
{
    public class RepositoriesResolver : IDependencyResolver,
        IDependencyTypeResolver<IUsersRepository>,
        IDependencyTypeResolver<ITasksRepository>,
        IDependencyTypeResolver<IStatusRepository>,
        IDependencyTypeResolver<ITaskWorkersRepository>,
        IDependencyTypeResolver<IUserEmailsRepository>,
        IDependencyTypeResolver<IUserPhonesRepository>
    {
        
        IUsersRepository IDependencyTypeResolver<IUsersRepository>.Resolve() { return new UsersRepositoryEF(); }
        ITasksRepository IDependencyTypeResolver<ITasksRepository>.Resolve() { return new TasksRepositoryEF(); }
        IStatusRepository IDependencyTypeResolver<IStatusRepository>.Resolve() { return new StatusRepositoryEF(); }
        ITaskWorkersRepository IDependencyTypeResolver<ITaskWorkersRepository>.Resolve() { return new TaskWorkersRepositoryEF(); }
        IUserEmailsRepository IDependencyTypeResolver<IUserEmailsRepository>.Resolve() { return new UserEmailsRepositoryEF(); }
        IUserPhonesRepository IDependencyTypeResolver<IUserPhonesRepository>.Resolve() { return new UserPhonesRepositoryEF(); }
    }
}
